$(function () {
    $('[data-toggle="popover"]').popover()
});

function checkForm(){
    var flag = false;
    var money = $('#money');
    var payPassword = $('#payPassword');
    var toAccount = $('#toAccount');

    if(toAccount !=null && toAccount.val()==''){
        toAccount.popover('show');
        setTimeOut();
    } else if (money.val() == ''){
        money.popover('show');
        setTimeOut()
    } else if (payPassword.val() == ''){
        payPassword.popover('show');
        setTimeOut()
     } else {
        flag = true;
    }
    return flag;
}
//延时器
function setTimeOut() {
    setTimeout(function () {
        $("#money").popover('hide');
        $("#payPassword").popover('hide');
        $('#toAccount').popover('hide');
    }, 2000);
}